package com.fjn.factorybean;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Books {
    private String bname;

    public void setBname(String bname) {
        this.bname = bname;
    }

    @Override
    public String toString() {
        return "Books{" +
                "bname='" + bname + '\'' +
                '}';
    }

    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("beans.xml");
        Books book = (Books)applicationContext.getBean("myBean",Books.class);
        System.out.println(book);
    }
}
